#ifndef ASSET_STORE_H
#define ASSET_STORE_H
#include <unordered_map>
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <string>

class assetStore{
    SDL_Renderer* renderer_ = nullptr;
    std::unordered_map<std::string, SDL_Texture*> Images;
    std::unordered_map<std::string, TTF_Font*> fonts;
    std::unordered_map<std::string, Mix_Music*> musics;
    std::unordered_map<std::string, Mix_Chunk*> sounds;
public:
    assetStore(SDL_Renderer* renderer){renderer_ = renderer;};
    ~assetStore() = default;
    void loadImage(const std::string& path);
    void loadFont(const std::string& path,int font_size);
    void loadMusic(const std::string& path);
    void loadSound(const std::string& path );
    SDL_Texture* getImage(const std::string& path);
    TTF_Font* getFont(const std::string& path,int font_size);
    Mix_Music* getMusic(const std::string& path);
    Mix_Chunk* getSound(const std::string& path);
    void clean();
};

#endif // ASSET_STORE_H